<!-- <!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
</head>

<body>
  <!-- 
  描述
请补全JavaScript代码，该函数接受两个参数分别为字符串、子字符串，要求返回子字符串在字符串中出现的频次。
 -->
  <script>
    const _searchStrIndexOf = (str, target) => {
      // 补全代码
      let a = str.split(target).length - 1
      let b = target.split('')
      console.log(a)
    }
    let str1 = 'aaa'
    let str2 = 'a'
    _searchStrIndexOf(str1,str2)
    
  </script>
</body>

</html> -->